<script setup>
import Lazyload from '..'
import FanImage from '../../image'

if (window.app && !window.lazyloadRegistered) {
	window.app.use(Lazyload)
	window.lazyloadRegistered = true
}
const imageList = [
	'https://cdn.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
	'https://cdn.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
	'https://cdn.jsdelivr.net/npm/@vant/assets/apple-3.jpeg',
	'https://cdn.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
	'https://cdn.jsdelivr.net/npm/@vant/assets/apple-5.jpeg'
]
</script>

<template>
	<demo-block title="基础用法">
		<FanImage v-for="img in imageList" :key="img" lazyload :src="img" radius="8px" style="margin: 15px" />
	</demo-block>
</template>
